<?php
namespace  app\common\validate;

use think\Validate;
class WeekProduct extends Validate {
       
    protected $rule = [
        //'name'=>'length:4,25' duration finance  project_progress week_work quality_control
        'title'  =>  'require|length:1,100', //标题
        'price'  =>  'require|number', //采购金额
        'purch_price'  =>  'require|number', //采购到货金额
        'provider'  =>  'require|length:1,100', //供应商
      
    ];
    
    protected $message = [
        'title.require'  =>  '标题必须填写',
        'price.require' =>  '采购金额必须填写',     
        'purch_price.require' =>  '采购到货金额必须填写',
        'provider.require'  =>  '供应商必须填写',
  

        'title.length'  =>  '标题长度10-100',
        'price.number' =>  '采购金额必须为数字',
        'purch_price.number'  =>  '采购到货金额必须为数字',
        'provider.length' =>  '供应商长度1-100',
     
    ];
}